<Define Text Block> "Howdy from MoGuide Assistant"
A demonstation of Apple Guide API usage.
Author: John Powers
File: Assistant.nml
Date: 17-Mar-94
<End Text Block>
# We want to specify the sequence ID's for our sequences
# rather than let Nevada assign them. We use the ID's in
# MoGuide to open the sequence.
<Build Sequence> "Open Art Window Topic", 3000
<Build Sequence> "Art Window Oops", 3001
<Build Sequence> "Demo Coach marks", 3004
<Build Sequence> "Panel detection", 3006
<Build Sequence> "Detect collision", 3008
<Build Sequence> "Hotkey", 3012
<Build Sequence> "Hotkey Glenn", 3013
<Build Sequence> "Hotkey Bill", 3014
<Build Sequence> "Hotkey Josh", 3015
<Build Sequence> "Hotkey Pat", 3016
<Build Sequence> "Hotkey Eileen", 3017
<Build Sequence> "Hotkey Kay", 3018
# Sequence Areas
<Topic Area> "MoGuide Assistant"
<Header> "Browsing MoGuide"
<Topic> "Introduction", "Browsing Introduction"
<Topic> "Menus", "Browsing Menus"
<Topic> "Windows", "Browsing Windows"
<Header> "Demonstrations"
<Topic> "Open Art Window", "Open Art Window Topic"
<Topic> "Mark pieces", "Demo Coach marks"
<Topic> "Reset pieces", "Panel detection"
<Topic> "Detect collision", "Detect collision"
<Topic> "Hotkey", "Hotkey"
# An introduction of the Assistant.
<Define Sequence> "Browsing Introduction"
<Panel> "Intro to the Browse"
<End Sequence>
# Use me, abuse me, but please browse me.
<Define Sequence> "Browsing Menus"
<Panel> "Menus"
<Panel> "Menus - File"
<Panel> "Menus - Edit"
<Panel> "Menus - MoGuide"
<Panel> "Menus - Window"
<End Sequence>
<Define Sequence> "Browsing Windows"
<Panel> "Windows"
<Panel> "Windows - Clipboard"
<Panel> "Windows - Art Window"
<Panel> "Windows - Feedback Window"
<Panel> "Windows - Feedback Context"
<Panel> "Windows - Feedback Coach"
<Panel> "Windows - Feedback Event"
<Panel> "Windows - Feedback Guide"
<Panel> "Windows - Feedback Assistant"
<End Sequence>
# Open Art Window for the user if necessary.
<Define Sequence> "Open Art Window Topic"
<Panel> "Intro"
<Start Making Sure> ArtWindowShowing(),"Art Window Oops"
<Panel> "Window is open"
<End Making Sure>
<End Sequence>
# Mark objects that can be moved.
<Define Sequence> "Demo Coach marks"
<SNBS> "Coach Nav Btns"
<Panel> "Coach marks"
<Start Making Sure> ArtWindowShowing(),"Art Window Oops"
<Panel> "First mark"
<Panel> "Second mark"
<Panel> "Third mark"
<Panel> "Fourth mark"
<End Making Sure>
<End Sequence>
# Have MoGuide signal Apple Guide when a user action occurs.
# The following sequence waits for a user action.
# A 'true' return from WaitCollision() would enable the
# user to go to the next panel. However, 'true' is never returned.
# Instead, Apple Guide sends the event in the WaitCollision
# parameter when the user action occurs. The
# event moves us to the next panel. We can't
# use 'gonp' because the panel is evaluated
# to false and would be skipped.
# Also, a "Coach Mark" in the first panel
# tells MoGuide that we are waiting for a collision.
<Define Sequence> "Detect collision"
<Panel> "Collision intro"
<Start Making Sure> ArtWindowShowing(),"Art Window Oops"
<Panel> "Waiting for collision"
<If> WaitCollision('gons')
<Panel> "Collision happened"
<If> WaitCollision('gons')
<Panel> "Collision happened again"
<If> WaitCollision('gons')
<Panel> "Collision again and again"
<End If>
<End If>
<Else>
<Panel> "Skipped collision"
<End If>
<End Making Sure>
<End Sequence>
# Let MoGuide know when a particular panel is showing.
<Define Sequence> "Panel detection"
<Panel> "Panel detection intro"
<Start Making Sure> ArtWindowShowing(),"Art Window Oops"
<Panel> "Detect this panel"
<End Making Sure>
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey"
<Panel> "Hotkey intro"
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey Glenn"
<Panel> "Hotkey Glenn"
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey Bill"
<Panel> "Hotkey Bill"
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey Josh"
<Panel> "Hotkey Josh"
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey Pat"
<Panel> "Hotkey Pat"
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey Eileen"
<Panel> "Hotkey Eileen"
<End Sequence>
# MoGuide calls up this sequence with a hot key.
<Define Sequence> "Hotkey Kay"
<Panel> "Hotkey Kay"
<End Sequence>
# Oops - Window must be open.
<Define Sequence> "Art Window Oops"
<Panel> "Open Art Window"
<End Sequence>
# Panels
<Define Panel> "Intro"
I am your MoGuide Assistant, click the right arrow to proceed.
<End Panel>
<Define Panel> "Intro to the Browse"
MoGuide is a demonstration of Apple Guide integration. The MoGuide Assistant (that's me) is an Apple Guide database for MoGuide.
That triangle button in the lower-left of this panel will take you back to the Assistant access window.
<End Panel>
<Define Panel> "Menus"
MoGuide menus are:
File
Edit
MoGuide
Window
Click the right arrow to continue.
<End Panel>
<Define Panel> "Menus - File"
You can use the File menu to open any Apple Guide database. If MoGuide opens the database, then you can also use the File menu to close the database.
Click the right arrow to continue.
<Coach Mark> "MenuFile"
<End Panel>
<Define Panel> "Menus - Edit"
The Edit menu is fully-functional, but MoGuide doesn't use it. Is that a contradiction?
Click the right arrow to continue.
<Coach Mark> "MenuEdit"
<End Panel>
<Define Panel> "Menus - MoGuide"
You can use the MoGuide menu to open and close Apple Guide databases specific to MoGuide. You can also use this menu to start and quit Apple Guide.
Click the right arrow to continue.
<Coach Mark> "MenuMoGuide"
<End Panel>
<Define Panel> "Menus - Window"
You can use the Window menu to open MoGuide windows, perform operations on the windows, and set context options.
<Coach Mark> "MenuWindow"
<End Panel>
<Define Panel> "Windows"
MoGuide windows are:
Clipboard
Art Window
Feedback Window
Click the right arrow to continue.
<End Panel>
<Define Panel> "Windows - Clipboard"
The Clipboard window is fully-functional, but MoGuide doesn't use it. MoGuide used to use it, but that's long ago. Don't-ya just hate to waste code?
Click the right arrow to continue.
<Coach Mark> "Clipboard"
<End Panel>
<Define Panel> "Windows - Art Window"
The Art window is used for all the demonstrations. The objects in the Art window may be dragged around, shuffled, and reset.
Click the right arrow to continue.
<On Panel Hide> OpenWindowFeedback()
<Coach Mark> "Art"
<End Panel>
<Define Panel> "Windows - Feedback Window"
The Feedback window shows when MoGuide receives a Coach, Context, or general event from itself or Apple Guide. The Guide field shows the status of Apple Guide.
Click the right arrow to continue.
<Coach Mark> "FBWindow"
<End Panel>
<Define Panel> "Windows - Feedback Context"
The Context event flashes when a context check query is received from Apple Guide. The context check is defined in the guide database and sent as panels are evaluated.
Click the right arrow to continue.
<Coach Mark> "FBContext"
<End Panel>
<Define Panel> "Windows - Feedback Coach"
The Coach event flashes when an object location query is received from Apple Guide. The Coach mark is defined in the guide database and sent by a Coach Mark command.
Click the right arrow to continue.
<Coach Mark> "FBCoach"
<End Panel>
<Define Panel> "Windows - Feedback Event"
The Event flashes when an Apple event is received from Apple Guide. The event is defined in the guide database and sent when a user does an action which includes the event.
Click the right arrow to continue.
<Coach Mark> "FBEvent"
<End Panel>
<Define Panel> "Windows - Feedback Guide"
The Guide field shows the status of Apple Guide as follows:
(none) - Standby (not running)
zzz… - Sleeping (running in the background)
accw - Access window showing
prew - Presentation window showing
Click the right arrow to continue.
<Coach Mark> "FBGuide"
<End Panel>
<Define Panel> "Windows - Feedback Assistant"
The Assistant button starts up the Assistant database (that's me).
<Coach Mark> "FBAssistant"
<End Panel>
<Define Panel> "Window is open"
Thank you for the open Art window.
<End Panel>
<Define Panel> "Open Art Window"
The MoGuide Art window must be open to continue. You can open it from the Window menu. Or, would you like me to open it for you?
<Standard Button> "Do It For Me", CENTER, OpenWindowArt()
<On Panel Show> AdvanceMe()
<End Panel>
<Define Panel> "Coach marks"
Pieces in the MoGuide Art window can be dragged to any location. As you go from panel to panel, an object will be marked. Apple Guide finds the object location by asking MoGuide.
Click the next arrow to proceed.
<End Panel>
<Define Panel> "First mark"
Mark Glenn.
<Coach Mark> "Glenn"
<End Panel>
<Define Panel> "Second mark"
Mark Bill.
<Coach Mark> "Bill"
<End Panel>
<Define Panel> "Third mark"
Mark Josh.
<Coach Mark> "Josh"
<End Panel>
<Define Panel> "Fourth mark"
Mark Glenn and Josh.
<Coach Mark> "Glenn-Josh"
<End Panel>
<Define Panel> "Panel detection intro"
An event attached to the next panel signals MoGuide to reset the pieces in the Art window.
<End Panel>
<Define Panel> "Detect this panel"
MoGuide Art window pieces are reset.
<On Panel Show> ResetPieces()
<End Panel>
<Define Panel> "Collision intro"
This sequence uses information from MoGuide. When a collision happens, we advance to the next panel.
Go to the next panel to start collision detection.
<End Panel>
<Define Panel> "Waiting for collision"
We are waiting for a collision.
<On Panel Show> WaitCollision()
<End Panel>
<Define Panel> "Collision happened"
The collision happened. Waiting for another collision.
<End Panel>
<Define Panel> "Collision happened again"
The collision happened again. Waiting for another collision.
<End Panel>
<Define Panel> "Collision again and again"
And again. But never again.
<On Panel Show> IgnoreCollision()
<End Panel>
<Define Panel> "Skipped collision"
Couldn't wait for a collision, could you?
<End Panel>
<Define Panel> "Hotkey intro"
Command-click an object in the Art window to learn more about that object. You can do this any time, not just when this Apple Guide panel is showing.
<End Panel>
<Define Panel> "Hotkey Glenn"
This is Glenn. Drag him to the other side of the Art window. He may also move in a shuffle.
<End Panel>
<Define Panel> "Hotkey Bill"
This is Bill. You cannot drag Bill. He may only move in a shuffle.
<End Panel>
<Define Panel> "Hotkey Josh"
This is Josh. Drag him to the other side of the Art window. He may also move in a shuffle.
<End Panel>
<Define Panel> "Hotkey Pat"
This is Pat. Drag her to the other side of the Art window. She may also move in a shuffle.
<End Panel>
<Define Panel> "Hotkey Eileen"
This is Eileen. You cannot drag Eileen. She may only move in a shuffle.
<End Panel>
<Define Panel> "Hotkey Kay"
This is Kay. Drag her to the other side of the Art window. She may also move in a shuffle.